/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package Relatorios;

import javax.swing.JOptionPane;
import net.sf.jasperreports.engine.JRException;
import net.sf.jasperreports.engine.JasperPrint;
import net.sf.jasperreports.view.JasperViewer;

/**
 *
 * @author Fabio
 */
public class PrincipalProdutos {
	public static void main(String[] args) throws JRException {
		RepositorioProduto rep = new RepositorioProduto();
		JasperPrint relat;

                try {
			relat = rep.gerar();
			JasperViewer.viewReport(relat, false);
		} catch (ExcRepositorio e) {
			JOptionPane.showMessageDialog(null, "Erro: " + e.getMessage());
		}
        }

}
